﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SCRUM.Core.BusinessObjects
{
    /// <summary>
    /// Bussines object for Widget Type.
    /// </summary>
    [Serializable()]
    public class WidgetType : BusinessObject
    {
        /// <summary>
        /// Gets or sets the folder.
        /// </summary>
        /// <value>The folder.</value>
        public string Folder { get; set; }

        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>The name.</value>
        public string Name { get; set; }

        /// <summary>
        /// Describes the widget.
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this <see cref="WidgetType"/> is enabled for any role to add this widget type to it's application.
        /// </summary>
        /// <value><c>true</c> if enabled; otherwise, <c>false</c>.</value>
        public bool Enabled { get; set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="WidgetType"/> class.
        /// </summary>
        /// <param name="id">The id.</param>
        /// <param name="name">The name.</param>
        public WidgetType(int id, string name, bool enabled)
            :base(id)
        {
            this.Folder = name;
            this.Name = this.LocalizeString("WidgetType"+"Title", name);
            this.Description = this.LocalizeString("WidgetType" + "Description", name);
            this.Enabled = enabled;
        }
    }
}
